package com.itheima.chouxiang;

import java.time.Period;
import java.util.concurrent.Callable;

public class Demo01 {
    public static void main(String[] args) {
       /* Animal animal = new Animal();
        animal.drink();
        animal.eat();*/
     /*   Person person = new Person();*/
        Cat cat = new Cat();
        cat.drink();
        cat.eat();

        Dog dog = new Dog();
        dog.eat();
        dog.drink();



    }

}

abstract class Animal {
    public abstract void eat();
    public void drink() {
        System.out.println("动物喝水");
    }
}
class Dog extends Animal {

    @Override
    public void eat() {
        System.out.println("狗吃狗粮");
    }
}
class Cat extends Animal{
    @Override
    public void eat() {
        System.out.println("猫吃猫粮");
    }
}

abstract class Person extends Animal{


}
abstract class  ChiSuPerson extends Person{


}